//	ID : pallab81
// 	PROG : 10074
// 	LANG : C++
// 	2011-08-28-21.28.58 Sunday
//
// 	"I have not failed, I have just found 10000 ways that won't work.
//


#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <bitset>

#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>
#include <cstdlib>

using namespace std;

#define VI vector< int >
#define CI( x ) scanf("%d",&x)
#define CL( x ) scanf("%lld",&x)
#define CD( x ) scanf("%lf",&x )
#define fo(i,ed) for(int i = 0 ; i < ed ; ++i )
#define foR(i,st,ed) for(int i = st ; i < ed ; ++i )
#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long
#define pb push_back
#define SZ(X) (int)(X).size()
#define LN(X) (int)(X).length()
#define mk make_pair
#define f first
#define s second
#define SET( ARRAY , VALUE ) memset( ARRAY , VALUE , sizeof(ARRAY) )

inline void wait( double seconds ){
    double endtime = clock()+( seconds* CLOCKS_PER_SEC );
    while( clock() < endtime ){
        ;
    }
}
int R,C;
int g[101][101];
int v[101][101];
inline void Read(){
    fo(i,R){
        fo(j,C){
            CI(g[i][j]);
        }
    }
}
inline void Proc(){
    fo(i,R){
        int d=0;
        fo(j,C){
            d = g[i][j]==0 ? d+1 : 0 ;
            v[i][j]=d;
        }
    }
    int mx=0;

    fo(i,R){
        fo(j,C){
            int left_ = v[i][j];
            int up_ = 1;
            for(int k=i;k>=0;--k,++up_){
                if( v[k][j] < left_ ){
                    left_ = v[k][j];
                }
                int area = left_* up_;
                if( area > mx  ){
                    mx = area;
                }
            }
        }
    }
    printf("%d\n",mx);
}

int main(){
//    #ifndef ONLINE_JUDGE
//        freopen("in.txt","rt",stdin);
//    #endif

    while( scanf("%d %d",&R,&C)==2 ){
        if( R==0 && C==0 )break;
        Read();
        Proc();
    }


return 0;
}
